package com.a2j.sys.user.mapper;

import com.a2j.beans.user.SysUser;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SysUserMapper {
    /**
     * 注册接口，SQL不能为空的几个字段
     * username
     * password
     * salt
     * phone
     */
    int register(SysUser record);

    // 查询所有用户，测试接口
    List<SysUser> allUser();


    SysUser login(String username, String password);

    SysUser findUserById(Integer userId);

    SysUser findUserByAccount(String account);

    int updateUser(SysUser record);
}